<!DOCTYPE html>
<html th:replace="layout/layout"
      xmlns:th="http://www.thymeleaf.org">
<style th:fragment="styles">

</style>
<div th:fragment="content">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>策划管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="/index">首页</a>
                </li>
                <li>
                    <a>活动策划</a>
                </li>
                <li class="active">
                    <strong>策划管理</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox ">
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <input type="text" id="search_eventName" name="search_eventName" placeholder="活动名称" autocomplete="off" class="form-control">
                                </div>
                            </div>
                            <div class="col-lg-2">
                                <button type="submit" class="btn btn-primary  btn-rounded  btn-sm" id="search" onclick="doSearch()"><i
                                        class="fa fa-search"></i>&nbsp;搜索</button>
                                <button type="submit" class="btn btn-warning  btn-rounded  btn-sm" id="refresh" onclick="doRest()"><i
                                        class="fa fa-refresh"></i>&nbsp;重置</button>
                            </div>
                        </div>

                        <div class="jqGrid_wrapper">
                            <div class="btn-group-sm" id="toolbar" role="group">
                                <a class="btn btn-success" name="AddNew" id="AddNew" data-toggle="modal" data-target="#myModalAdd" onclick="addRecord();"  >
                                    <i class="fa fa-plus"></i> 新增
                                </a>
<!--                                <a class="btn btn-success" name="AddAll" id="AddAll" data-toggle="modal" onclick="addAll();"  >-->
<!--                                    <i class="fa fa-plus"></i> 批量增加-->
<!--                                </a>-->
                            </div>

                            <table class="table table-striped table-bordered table-hover " id="tableList" >
                            </table>


                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--模态框-->
    <div class="modal inmodal" id="myModalAdd" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog  modal-lg">
            <div class="modal-content animated bounceInRight">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">活动信息</h4>
                </div>
                <div class="modal-body">
                    <!--@*模态框body*@-->

                    <div class="tabs-container">

                        <form class="form-horizontal" id="myform">
                            <div class="panel-body form-horizontal">

                                <div class="row">
                                    <label class="col-lg-2 control-label">活动名称</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_eventName" name="text_eventName" placeholder="活动名称(必填)" autocomplete="off" class="form-control" maxlength="100">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">活动详情</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_eventRemark" name="text_eventRemark" placeholder="活动详情(必填)" autocomplete="off" class="form-control" maxlength="100">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">活动开始时间</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_eventStarTime" name="text_eventStarTime" placeholder="活动开始时间(必填)" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">活动结束时间</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_eventEndTime" name="text_eventEndTime" placeholder="活动结束时间(必填)" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">活动金额</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="text_eventAmount" name="text_eventAmount" placeholder="活动金额(必填)" autocomplete="off" class="form-control" maxlength="100">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">入账金额</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="text_amount" name="text_amount" placeholder="入账金额(必填)" autocomplete="off" class="form-control" maxlength="100">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">是否可用优惠券</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_isUse' name='text_isUse' class="form-control">
                                                <option value="1">可用</option>
                                                <option value="0" selected>禁用</option>
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">返还类型</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="radio" class="control-label" value="0" name="category" /> 不返还
                                            <input type="radio" class="control-label" value="1" name="category" /> 年返
                                            <input type="radio" class="control-label" value="2" name="category" /> 月返
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div style="display:none;" id="A">
                                        <label class="col-lg-2 control-label">年返金额</label>
                                        <div class="col-lg-4">
                                            <div class="form-group">
                                                <input type="number" id="text_yearReturn" name="text_yearReturn" placeholder="年返金额(必填)" autocomplete="off" class="form-control" maxlength="100">
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div style="display:none;" id="B">
                                        <label class="col-lg-2 control-label">月返金额</label>
                                        <div class="col-lg-4">
                                            <div class="form-group">
                                                <input type="number" id="text_monthReturn" name="text_monthReturn" placeholder="月返金额(必填)" autocomplete="off" class="form-control" maxlength="100">
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <div style="display:none;" id="C">
                                        <label class="col-lg-2 control-label">返还次数</label>
                                        <div class="col-lg-4">
                                            <div class="form-group">
                                                <input type="number" id="text_frequency" name="text_frequency" placeholder="返还次数(必填)" autocomplete="off" class="form-control" maxlength="100">
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>

                    <!--模态框body结束-->
                </div>
                <div class="modal-footer">
                    <button type="button" id="save" name="save" class="btn btn-success" onclick="saveRecord();"><i class="fa fa-save"></i>&nbsp;保存</button>
                    <button type="button" id="close" name="close" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-close"></i>&nbsp;关 闭</button>
                </div>
            </div>
        </div>
    </div>

</div>
<div th:fragment="scriptRef">
    <script th:src="@{/js/lib/inspinia/js/plugins/laydate/laydate.js}"></script>
    <script th:src="@{/js/eventplann/eventplann.js}"></script>
    <!--表单验证-->
    <script th:src="@{/js/lib/validate/jquery.validate.min.js}"></script>
</div>
<script th:fragment="scripts" type="text/javascript">
    Eventplann.init();
</script>
</html>